#include <iostream>

class MyPrint
{
public:
    int num;

    MyPrint() : num(0)
    {}

    void operator()(int n)
    {
        std::cout << n << std::endl;
        num++;
    }
};

int main()
{
    MyPrint print;
    print(10);
    print(100);
    print(1000);
    print(99);
    std::cout << print.num << std::endl;
    print(print.num);
    print(print.num);
    return 0;
}